﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DynaPrecision.FunctionAnalysis
{
	public class DelegateWrapper<TInput, TResult> : IFunction<TInput, TResult>
	{

		public static explicit operator DelegateWrapper<TInput, TResult>(Func<TInput, TResult> aFunction)
		{
			DelegateWrapper<TInput, TResult> result = new DelegateWrapper<TInput, TResult>();
			result.Functor = aFunction;
			return result;
		}
		#region IFunction<TInput,TResult> Members

		public Func<TInput, TResult> Functor
		{
			get;
			set;
		}
		public IFunction<TInput, TResult> Derivative
		{
			get;
			set;
		}

		public IFunction<TInput, TResult> Integral
		{
			get;
			set;
		}

		#endregion
	}
}
